// Copyright 2016 The Closure Rules Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

{namespace io.bazel.rules.closure.server}


/**
 * Displays page listing paths in transitive closure.
 */
{template .listing}
  {@param label: string}
  {@param paths: list<string>}
  <!doctype html>
  <link href="//fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  <style>
    body {lb}
      font-family: 'Roboto', sans-serif;
      margin: 0 auto;
      padding: 0 1em;
      width: 960px;
      color: #333;
    {rb}

    a {lb}
      text-decoration: none;
    {rb}

    h1 {lb}
      margin-bottom: 0;
    {rb}

    h3 {lb}
      margin-top: 0;
      color: #999;
    {rb}
  </style>
  <h1>Bazel Closure Rules</h1>
  <h3>{$label}</h3>
  <p>
    {for $path in $paths}
      <a href="{$path}">{$path}</a><br>
    {ifempty}
      No srcs found in transitive closure with path component prefix matching
      request path.
    {/for}
{/template}
